<template>
  <van-row class="top">
    <van-col span="2">
      <router-link to="/home">
        <van-icon name="wap-home-o" />
      </router-link>
    </van-col>
    <van-col span="12" offset="4">
      <div class="logoWraap">
        <span class="logo"></span>
      </div>
    </van-col>
    <van-col span="6">
      <router-link to="/search">
        <van-icon name="search" class="search"/>
      </router-link>
      <i class="w20"></i>
      <router-link to="/cart">
        <van-icon name="shopping-cart-o" />
      </router-link>
    </van-col>
  </van-row>
</template>

<script>
export default {
  name: "Top",
};
</script>

<style lang="less" scoped>

.top {
  border-bottom: 1px solid #999;
  // 吸顶效果
  position: sticky;
  top: 0px;
  z-index: 999;
  background-color: #fff;
  padding: 0 10px;
  height: 50px;
  line-height: 50px;
  text-align: center;
  font-size: 28px;
  overflow: hidden;
  span {
    font-size: 18px;
    display: block;
    margin-bottom: 10px;
  }
  .search {
    margin-right: 20px;
    transform: scale(1.2);
  }
  .logoWraap {
    padding-top: 10px;
    margin-left: 20px;
    .logo {
      display: block;
      width: 60px;
      height: 20px;
      background: url(~@/assets/logo2.png);
      background-size: 3.76rem 3.76rem;
      background-position: -1rem -2.4rem;
      transform: scale(1.5);
    }
  }
}
</style>